package codename.carrot.bomberman.game.listener;

import codename.carrot.bomberman.LevelDefinition;
import codename.carrot.bomberman.game.gamemessages.GameInitMessage;
import codename.carrot.bomberman.game.gamemessages.PlayerJoinMessage;
import codename.carrot.bomberman.game.gamemessages.PlayerQuitMessage;

/**
 *  Interface for classes that listens to player join/quit messages
 * @author Group A4
 *
 */
public interface PlayerStateListener {
    /**
     *  Notification for when a player joins the game
     * @param pm the join-message which contains useful information
     * @param playerId the ID of the player that joined the game
     */
    public void onPlayerJoin(PlayerJoinMessage pm, int playerId);
    
    /**
     *  Notification for when a player has quit the game
     * @param pm the quit-message
     */
    public void onPlayerQuit(PlayerQuitMessage pm);
    
    /**
     *  Notification for when a game is about to commence
     * @param gameInit a message containing leveldefinition, initial placement of the players etc
     * @see LevelDefinition
     */
    public void onInitBeforegame(GameInitMessage gameInit);
}   
